Add gdk_cairo_set_source_pixmap. (#318805, Alexander Larsson)
authorMatthias Clasen <mclasen@redhat.com>
Fri, 30 Dec 2005 07:16:35 +0000 (07:16 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 30 Dec 2005 07:16:35 +0000 (07:16 +0000)
2005-12-30  Matthias Clasen  <mclasen@redhat.com>

* gdk/gdk.symbols:
* gdk/gdkcairo.h:
* gdk/gdkcairo.c: Add gdk_cairo_set_source_pixmap.  (#318805,
Alexander Larsson)

ChangeLog
ChangeLog.pre-2-10
docs/reference/ChangeLog
docs/reference/gdk/gdk-sections.txt
gdk/gdk.symbols
gdk/gdkcairo.c
gdk/gdkcairo.h

index bdddaa6083c006f497af203872d54cefe6372e02..5a7fd7040a77188f994d886986478bb6e3addf48 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2005-12-30  Matthias Clasen  <mclasen@redhat.com>
 
+       * gdk/gdk.symbols: 
+       * gdk/gdkcairo.h: 
+       * gdk/gdkcairo.c: Add gdk_cairo_set_source_pixmap.  (#318805,
+       Alexander Larsson)
+
        * gdk/gdkdisplaymanager.c (gdk_display_manager_set_property): Call
        gdk_display_manager_set_default_display() to change the default
        display.  (#153623, Stefan Kost)
index bdddaa6083c006f497af203872d54cefe6372e02..5a7fd7040a77188f994d886986478bb6e3addf48 100644 (file)
@@ -1,5 +1,10 @@
 2005-12-30  Matthias Clasen  <mclasen@redhat.com>
 
+       * gdk/gdk.symbols: 
+       * gdk/gdkcairo.h: 
+       * gdk/gdkcairo.c: Add gdk_cairo_set_source_pixmap.  (#318805,
+       Alexander Larsson)
+
        * gdk/gdkdisplaymanager.c (gdk_display_manager_set_property): Call
        gdk_display_manager_set_default_display() to change the default
        display.  (#153623, Stefan Kost)
index 5003b67a818a7c58f0e2a9d163d586527bb688ab..3f7a9ceaff2e9439a006c73e875ee2ff53d4e147 100644 (file)
@@ -1,3 +1,7 @@
+2005-12-30  Matthias Clasen  <mclasen@redhat.com>
+
+       * gdk/gdk-sections.txt: Add gdk_cairo_set_source_pixmap
+
 2005-12-29  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/tmpl/gtkmain.sgml: Add deprecation note to
index 44023dd608dcf90a8a8d243b5eb6d84e71d37ca5..1a933a29feef671f310272e20eea2f958287ad23 100644 (file)
@@ -874,9 +874,10 @@ GdkPangoRendererPrivate
 <TITLE>Cairo Interaction</TITLE>
 <FILE>cairo_interaction</FILE>
 gdk_cairo_create
-gdk_cairo_set_source_color
+gdk_cairo_set_source_colorg
 gdk_cairo_set_source_pixbuf
-gdk_cairo_rectangle
+gdk_cairo_set_source_pixmap
+dk_cairo_rectangle
 gdk_cairo_region
 </SECTION>
 
index 068ea03095672369ffc1f333b6f81a948e586892..1a86c9aa1203bad452bcddf9b831c92d669a4377 100644 (file)
@@ -294,6 +294,7 @@ gdk_fontset_load_for_display
 gdk_cairo_create
 gdk_cairo_set_source_color
 gdk_cairo_set_source_pixbuf
+gdk_cairo_set_source_pixmap
 gdk_cairo_rectangle
 gdk_cairo_region
 #endif
index 5c011c08890bc10d7acf68a9ebfdf97c0122b08f..b20381e265d1ec771eb79c63b6b323ebf9d42207 100644 (file)
@@ -224,5 +224,32 @@ gdk_cairo_set_source_pixbuf (cairo_t   *cr,
   cairo_surface_destroy (surface);
 }
 
+/**
+ * gdk_cairo_set_source_pixmap:
+ * @cr: a #Cairo context
+ * @pixmap: a #GdkPixmap
+ * @pixmap_x: X coordinate of location to place upper left corner of @pixmap
+ * @pixmap_y: Y coordinate of location to place upper left corner of @pixmap
+ * 
+ * Sets the given pixmap as the source pattern for the Cairo context.
+ * The pattern has an extend mode of %CAIRO_EXTEND_NONE and is aligned
+ * so that the origin of @pixbuf is @pixbuf_x, @pixbuf_y
+ *
+ * Since: 2.10
+ **/
+void
+gdk_cairo_set_source_pixmap (cairo_t   *cr,
+                            GdkPixmap *pixmap,
+                            double     pixmap_x,
+                            double     pixmap_y)
+{
+  cairo_surface_t *surface;
+  
+  surface = _gdk_drawable_ref_cairo_surface (GDK_DRAWABLE (pixmap));
+  cairo_set_source_surface (cr, surface, pixmap_x, pixmap_y);
+  cairo_surface_destroy (surface);
+}
+
+
 #define __GDK_CAIRO_C__
 #include "gdkaliasdef.c"
index 3918f2381ee8d466b84884ca981689470b32cd6f..8550e6bc58dc8fea37705acd02bff61a1f964bf8 100644 (file)
@@ -34,6 +34,10 @@ void gdk_cairo_set_source_pixbuf (cairo_t      *cr,
                                  GdkPixbuf    *pixbuf,
                                  double        pixbuf_x,
                                  double        pixbuf_y);
+void gdk_cairo_set_source_pixmap (cairo_t   *cr,
+                                 GdkPixmap *pixmap,
+                                 double     pixmap_x,
+                                 double     pixmap_y);
 
 void gdk_cairo_rectangle (cairo_t      *cr,
                          GdkRectangle *rectangle);